package com.kx.center.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.kx.center.entity.Address;
import com.kx.center.entity.StoreAppAccount;
import com.kx.center.entity.StoreInfo;
import com.kx.center.entity.query.QueryFoodCategory;
import com.kx.center.entity.query.QueryResult;
import com.kx.center.entity.shop.ShopOrder;
import com.kx.center.entity.shop.ShopOrderGoods;
import com.kx.center.entity.shop.ShopOrderPay;

/**
 * Created by bruce on 16-1-13.
 */
public interface ShopOrderService {
	
	public ArrayList<HashMap<String, Object>> pushClientMessage(ShopOrder shopOrder);//封装推送信息
	public List<String> mailRecipient(int companyId);//封装邮件收件人
	public void updateOrderAndPayStatus(HashMap<String, Object> data, Integer channel);//修改订单表和支付表状态
	//订货单
    public String saveShopOrder(StoreAppAccount storeAppAccount, StoreInfo storeInfo, List<HashMap<String, Object>> json);
    public QueryResult queryShopOrder(QueryFoodCategory queryFoodCategory);
    public ShopOrder findShopOrderById(Integer id);
    public void cancelShopOrder(ShopOrder shopOrder);
    public void confirmShopOrder(ShopOrder shopOrder);
    public void rejectShopOrder(ShopOrder shopOrder);
    public void paymentShopOrder(ShopOrder shopOrder);
    public void deliverShopOrder(ShopOrder shopOrder);
    public void receiveShopOrder(ShopOrder shopOrder);
    //订货单详情
    public List<ShopOrderGoods> findShopOrderGoodsById(Integer id);
    //订货单支付
    public HashMap<String, String> saveShopOrderPay(HttpServletRequest request, Integer id, Integer channel) throws Exception;
    public void updatePayStatusByPayNum(ShopOrderPay shopOrderPay);
	public List<ShopOrderPay> findShopOrderPayPN();
	public ShopOrderPay findShopOrderPayByPayNum(String payNum);
	public Address findShopOrderAddress(Integer id);
	public Address getOrderAddress(Integer orderId);
	
}
